#lang racket


(require "../point.rkt")


(require "global.rkt")


(provide partial-derivative
         differenciate-tangent)


(define (partial-derivative proc uf vf ui vi delta)
  (p*n (p-p (proc uf vf) (proc ui vi)) (/ delta)))

(define (differenciate-tangent proc u v (delta differenciation-delta))
  (list
   (partial-derivative proc (+ u delta) v u v delta)
   (partial-derivative proc u (+ v delta) u v delta)))